import type Response_Dto from '@/dto/response/Api_Result';
import { v4 } from 'uuid'
/**
 * 获取菜单
 * @returns 
 */
export const get_menus = (): Promise<Response_Dto> => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve({
                code: 0,
                message: 'ok',
                data: [
                    {
                        name: '首页',
                        url: '/',
                        children: [],
                        icon: 'iconfont icon-shouye'
                    },
                    {
                        name: '组织架构',
                        url: v4(),
                        icon: 'iconfont icon-zuzhi',
                        children: [
                            {
                                name: '部门',
                                url: '/org/dept',
                                children: [],
                                icon: 'iconfont icon-bumen'
                            },
                            {
                                name: '岗位',
                                url: '/org/duty',
                                icon: 'iconfont icon-buxing',
                                children: []
                            }
                        ]
                    },
                    {
                        name: '权限管理',
                        url: v4(),
                        children: [
                            {
                                name: '主页',
                                url: '/right',
                                children: []
                            },
                            {
                                name: '配置',
                                url: '/right/config',
                                children: []
                            },
                            {
                                name: '授权',
                                url: '/right/give',
                                children: []
                            }
                        ]
                    }
                ]
            });
        }, 1500);
    });
} 